<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<html:html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title></title>
	<META http-equiv=Pragma content=no-cache>
	<META http-equiv=Cache-Control content=no-cache>
	<META http-equiv=Expires content=0>
	<link rel="stylesheet"
		href="<%=request.getContextPath()%>/resource/css/style.css"
		type="text/css">
	<script language="javascript" type="text/javascript"
		src="<%=request.getContextPath()%>/style/scripts/util.js"></script>
	<script language="javascript" type="text/javascript"
		src="<%=request.getContextPath()%>/resource/js/AdyhUtil.js"></script>
	<script language="javascript" type="text/javascript"
		src="<%=request.getContextPath()%>/resource/calendar/DCDA_C03.js"></script>		
	<script type="text/javascript">
	function getMessage() {
	var errorMsg = document.forms[0].errorFlag.value;
	
	if ("" != errorMsg) {
		//**操作成功！*/
		if (errorMsg == 0) {
			alert("<bean:message key="common.alert1"/>");
		}
		//**操作失败！*/
		if (errorMsg == 1) {
			alert("<bean:message key="common.alert2"/>");
		}
		//**查询无结果！*/
		if (errorMsg == 2) {
			alert("<bean:message key="common.alert3"/>");
			document.getElementById("operationType").value="init";
		}
		//**系统异常，请联系管理员！*/
		if (errorMsg == 3) {
			alert("<bean:message key="common.alert4"/>");
		}
		document.forms[0].errorFlag.value = "";
	}
}

/**非空校验*/
function CheckEmpty(str)
  {	  	 
  	var manufacturingOrder = document.getElementById("manufacturingOrder").value;
	var productCode = document.getElementById("productCode").value;
	var operationType = document.getElementById("operationType").value;	 	
	if(manufacturingOrder==0&&productCode==0){
		alert("<bean:message key="common.alert9"/>");
		return false;
	}else{
		if("export"==str&&"queryList"!=operationType){
			alert("<bean:message key="common.alert10"/>");
			return false;
		}
		operation(str);		
		return true;		
	}
  }
	</script>		
</head>
<body onLoad="getMessage();">
	<html:form method="post" action="/pages/F02/F020205.do"
		enctype="multipart/form-data">
		<html:hidden property="operationType" />
		<html:hidden property="errorFlag" />
		<html:hidden property="id" />
		<!--Begin：表单折叠区块1-->
		<div id="divDlock_2" class="DivBlock">
			<div class="DivHead">
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td nowrap class="line_wrap" width="37" height="17">
							<img
								src="<%=request.getContextPath()%>/resource/image/block_unwrap.gif"
								style="CURSOR: hand;" alt="展开/折叠"
								onClick="JavaScript:WrapBlock('divDlock_2');">
						</td>
						<td nowrap class="line_wrap" width="100%" height="17">
							<span class="SpanTitle">
							<input name="title" style="width:100%;text-align:left;background:none;
							border:0pt;font-weight:bolder;font-size:12px;" 
							readonly="true" value="<bean:message key="F020205.title"/>">
							</span>
						</td>
					</tr>
				</table>
			</div>
			<div class="DivTail" style="display:block">
				<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
					<TR>
						<TD NOWRAP align="right" WIDTH="15%">
							<!--工作号--><bean:message key="adyh.ManufacturingOrder"/>&nbsp;
						</TD>
						<TD NOWRAP align="left" WIDTH="18%">							
							<html:text property="manufacturingOrder" styleClass="Mytext"/>							
						</TD>	
						<TD NOWRAP align="right" WIDTH="15%">
							<!--制造代码--><bean:message key="F02.ProductCode"/>&nbsp;
						</TD>
						<TD NOWRAP align="left" WIDTH="18%">							
							<html:text property="productCode" styleClass="Mytext"/>							
						</TD>			
						<TD NOWRAP align="right" WIDTH="15%">
						</TD>
						<TD NOWRAP align="left" WIDTH="19%">
						</TD>							
					</TR>										
				</TABLE>
			</div>
		</div>
		<!--End：表单折叠区块1-->
		<!--Begin：表单按钮及提示区-->
		<div class="DivBlock">
			<div class="DivButton" style="text-align:right ">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td align="left">
							<input type="button" name="Submit1" class="MyButton" value="<bean:message key="common.export"/>"
								onClick="javascript:CheckEmpty('export');">
						</td>
						<td align="right">
							<input type="button" name="Submit1" class="MyButton" value="<bean:message key="common.query"/>"
								onClick="javascript:CheckEmpty('queryList');">
							<input type="button" name="Submit2" class="MyButton" value="<bean:message key="common.back"/>"
								onClick="window.location='../../frame/blank.html'">
						</td>
					</tr>
				</table>
			</div>
		</div>
		<!--End：表单按钮及提示区-->		
		<!--Begin：查询列表-->
		<logic:present name="F020205ActionForm" property="list">					
			<div>
				<table id="tbList" width="100%" cellpadding="1" cellspacing="1"
					border="0" rules="none" class="ListBackground">
					<tr align="center" class="ListRow1">
      					<td nowrap align="center" ><!--工作号码-->
      					<input name="manu" style="width:100%;text-align:center;background:none;border:0pt;font-size:12px"
      					 readonly="true" value="<bean:message key="adyh.ManufacturingOrder"/>">
      					</input>      					
      					</td>
      					<td nowrap align="center" colspan="2">
							<html:text property="manufacturingOrder" style="width:100%;text-align:left;background:none;border:0pt;" readonly="true" styleClass="MyText" />
						</td>
      					<td nowrap align="center"><!--制造代码-->
      					<input name="pcode" style="width:100%;text-align:center;background:none;border:0pt;font-size:12px"
      					 readonly="true" value="<bean:message key="F02.ProductCode"/>">						
						</td>
      					<td nowrap align="center" colspan="4">								
							<html:text property="productCode" style="width:100%;text-align:left;background:none;border:0pt" readonly="true" styleClass="MyText" />
						</td>
    				</tr>
					<tr align="center" class="ListRow1">
      					<td nowrap align="center"><!--产品类别-->
      					<input name="ptype" style="width:100%;text-align:center;background:none;border:0pt;font-size:12px"
      					 readonly="true" value="<bean:message key="adyh.productType"/>">      					
      					</td>
      					<td nowrap align="center" colspan="2">								
							<html:text property="productTypeName" style="width:100%;text-align:left;background:none;border:0pt" readonly="true" styleClass="MyText" />
						</td>
      					<td nowrap align="center"><!--产品模型-->
      					<input name="mtype" style="width:100%;text-align:center;background:none;border:0pt;font-size:12px"
      					 readonly="true" value="<bean:message key="F02.ModelType"/>">						
						</td>
      					<td nowrap align="center" colspan="4">								
							<html:text property="modelTypeName" style="width:100%;text-align:left;background:none;border:0pt" readonly="true" styleClass="MyText" />
						</td>
    				</tr>
    				<tr align="center" class="ListRow1">
	  					<td nowrap align="center"><!--描述-->
	  					<input name="decp" style="width:100%;text-align:center;background:none;border:0pt;font-size:12px"
      					 readonly="true" value="<bean:message key="adyh.description"/>">	  					
	  					</td>
      					<td nowrap align="center" colspan="7">								
							<html:text property="description" style="width:100%;text-align:left;background:none;border:0pt" readonly="true" styleClass="MyText" />
						</td>
    				</tr>					 				    				    
					<tr align="center" class="ListTitle">
						<td nowrap width="10%"><!--阶段名称-->
							<input name="pname" style="width:100%;text-align:center;background:none;border:0pt;font-size:12px"
      					 readonly="true" value="<bean:message key="F02.PhasesName"/>">							
						</td>
						<td nowrap width="20%"><!--材料代码-->
							<input name="mcode" style="width:100%;text-align:center;background:none;border:0pt;font-size:12px"
      					 readonly="true" value="<bean:message key="adyh.materialCode"/>">							
						</td>
						<td nowrap width="20%"><!--材料名称-->
							<input name="mname" style="width:100%;text-align:center;background:none;border:0pt;font-size:12px"
      					 readonly="true" value="<bean:message key="adyh.materialName"/>">							
						</td>
						<td nowrap width="10%"><!--描述-->
							<input name="mdecp" style="width:100%;text-align:center;background:none;border:0pt;font-size:12px"
      					 readonly="true" value="<bean:message key="adyh.description"/>">							
						</td>
						<td nowrap width="10%"><!--数量-->
							<input name="qty" style="width:100%;text-align:center;background:none;border:0pt;font-size:12px"
      					 readonly="true" value="<bean:message key="adyh.quantity"/>">							
						</td>
						<td nowrap width="10%"><!--单位-->
							<input name="meas" style="width:100%;text-align:center;background:none;border:0pt;font-size:12px"
      					 readonly="true" value="<bean:message key="F02.MeasureName"/>">							
						</td>										
						<td nowrap width="10%"><!--单价-->
							<input name="price" style="width:100%;text-align:center;background:none;border:0pt;font-size:12px"
      					 readonly="true" value="<bean:message key="F010102.unit_price"/>">
						</td>
						<td nowrap width="10%"><!--总价-->
							<input name="tprice" style="width:100%;text-align:center;background:none;border:0pt;font-size:12px"
      					 readonly="true" value="<bean:message key="F010102.total_price"/>">
						</td>						
					</tr>
					<logic:iterate id="rowp" name="F020205ActionForm" property="list">
						<tr class="ListRow1">
							<td nowrap align="center">
								<bean:write name="rowp" property="phasesName" />
							</td>
							<td nowrap align="center">
								<bean:write name="rowp" property="materialCode" />
							</td>
							<td nowrap align="center">
								<bean:write name="rowp" property="materialName" />
							</td>
							<td nowrap align="center">
								<bean:write name="rowp" property="materialDescription" />
							</td>							
							<td nowrap align="center">
								<bean:write name="rowp" property="quantity" />
							</td>
							<td nowrap align="center">
								<bean:write name="rowp" property="measureName" />
							</td>							
							<td nowrap align="right">
								<bean:write name="rowp" property="unitPrice" />
							</td>
							<td nowrap align="right">
								<bean:write name="rowp" property="groupPrice" />
							</td>							
						</tr>
					</logic:iterate>
						<tr align="center" class="ListRowRed" >
      						<td nowrap align="center" colspan="7">
      							<input name="total" style="width:100%;text-align:center;background:none;border:0pt;font-size:12px"
      					 			readonly="true" value="<bean:message key="F010102.total_price"/>">      						
      						</td>            
      						<td nowrap align="right">
							<html:text property="totalPrice" style="width:100%;text-align:right;background:none;border:0pt" readonly="true" styleClass="MyText" />
							</td>
    					</tr>
				</table>
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td class="fieldset2">
							<bean:define id="actionFormName" value="F020205ActionForm" />
							<%@ include file="../../style/pagejsp/pageable.jsp"%>
						</td>
					</tr>
				</table>
			</div>
		</logic:present>
		<!--End：查询列表-->
	</html:form>
</body>
</html:html>
<script language="javascript" type="text/javascript">
InitForm();
FocusTableRow("tbList",1);
</script>
